<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>类型属性</title>
	<hdjs/>
</head>
<body>
	<div class='wrap'>
		<div class='menu_list'>
			<ul>
				<li>
					<a href="{|U:'add',array('cat_id'=>Q('cat_id'))}">添加属性</a>
				</li>
				<li>
					<select onchange="changeGoodsType(this)">
						<option value="0">==商品类型==</option>
						<!-- 设置当前被选中的商品类型 -->
						<list from='$goods_type' name='$gt'>		
							<option value="{$gt.cat_id}" 
							<if value="$gt.cat_id==Q('cat_id')">selected='' </if>>{$gt.cat_name}</option>
						</list>
					</select>
				</li>
			</ul>
		</div>
		<div>
			<table class='table2'>
				<thead>
					<tr>
						<td class='w50'>ID</td>
						<td>属性名称</td>
						<td>属性类型</td>
						<td>录入方式</td>
						<td class='w100'>操作</td>
					</tr>
				</thead>
				<tbody>
					<list from="$data" name="$d">
						<tr>
							<td>{$d.attr_id}</td>
							<td>{$d.attr_name}</td>
							<td>{$d.attr_type_text}</td>
							<td>{$d.attr_input_type_text}</td>
							<td>
								<a href="{|U:'edit',array('attr_id'=>$d['attr_id'])}">编辑</a> |
								<a href="{|U:'del',array('attr_id'=>$d['attr_id'])}" onclick="return confirm(你确定要删除吗?)">删除</a>
							</td>
						</tr>
					</list>
				</tbody>
			</table>
		</div>
	</div>
	<js file='__CONTROLLER_VIEW__/Js/index.js'/>
</body>
</html>